**18CPCto19CPCP
use "C:\Users\User\OneDrive\桌面\18net.dta"
*Politburo
logit politburo degree gender edu age,robust
eststo e1
logit politburo closnesscentrality gender edu age,robust
eststo e2
logit politburo betweenesscentrality gender edu age,robust
eststo e3
logit politburo eigencentrality gender edu age,robust
eststo e4
esttab e1 e2 e3 e4, se pr2 scalars("ll Log lik." "chi2 Chi-squared")

*Figure6
gen de_res=degree/100
gen bt_res=betweenesscentrality/1000
quiet logit politburo de_res gender edu age,robust
margins, dydx(*) post
eststo e1
quiet logit politburo closnesscentrality gender edu age,robust
margins, dydx(*) post
eststo e2
quiet logit politburo bt_res gender edu age,robust
margins, dydx(*) post
eststo e3
quiet logit politburo eigencentrality gender edu age,robust
margins, dydx(*) post
eststo e4
coefplot (e1, label(Degree)) (e2, label(Closeness Centrality)) (e3, label(Betweenness Centraltiy)) (e4, label(Eigenvector Centrality)), drop(_cons gender age edu) coeflabels(de_res="Degree" closnesscentrality="Closeness Centrality" bt_res="Betweenness Centrality" eigencentrality="Eigenvector Centrality" gender="Female" age="Age" edu="Education Level" ) xline(0) xtitle(Predicted Probability of Promotion to the 19th Politburo) scheme(s1mono) offset(0)


*party_rank
qui logit pro_rank degree edu age,robust
eststo k1
qui logit pro_rank closnesscentrality edu age,robust
eststo k2
qui logit pro_rank betweenesscentrality edu age,robust
eststo k3
qui logit pro_rank eigencentrality edu age,robust
eststo k4
esttab k1 k2 k3 k4, se pr2 scalars("ll Log lik." "chi2 Chi-squared")

*Figure7
gen de_res=degree/100
gen bt_res=betweenesscentrality/1000
quiet logit pro_rank de_res edu age,robust
margins, dydx(*) post
eststo n1
quiet logit pro_rank closnesscentrality edu age,robust
margins, dydx(*) post
eststo n2
quiet logit pro_rank bt_res edu age,robust
margins, dydx(*) post
eststo n3
quiet logit pro_rank eigencentrality edu age,robust
margins, dydx(*) post
eststo n4
coefplot (n1, label(Degree)) (n2, label(Closeness Centrality)) (n3, label(Betweenness Centraltiy)) (n4, label(Eigenvector Centrality)), drop(_cons gender age edu) coeflabels(de_res="Degree" closnesscentrality="Closeness Centrality" bt_res="Betweenness Centrality" eigencentrality="Eigenvector Centrality" gender="Female" age="Age" edu="Education Level" ) xline(0) xtitle(Predicted Probability of Ranking Promotion in the 19th Party Congress) scheme(s1mono) offset(0)


**19CPCto20CPCP
use "C:\Users\User\OneDrive\桌面\19net.dta"
*Politburo
logit politburo degree gender age edu,robust
eststo n1
logit politburo closnesscentrality gender edu age,robust
eststo n2
logit politburo betweenesscentrality gender edu age,robust
eststo n3
logit politburo eigencentrality gender edu age,robust
eststo n4
esttab n1 n2 n3 n4, se pr2 scalars("ll Log lik." "chi2 Chi-squared")

*Figure6
gen de_res=degree/100
gen bt_res=betweenesscentrality/1000
quiet logit politburo de_res gender edu age,robust
margins, dydx(*) post
eststo n1
quiet logit politburo closnesscentrality gender edu age,robust
margins, dydx(*) post
eststo n2
quiet logit politburo bt_res gender edu age,robust
margins, dydx(*) post
eststo n3
quiet logit politburo eigencentrality gender edu age,robust
margins, dydx(*) post
eststo n4
coefplot (n1, label(Degree)) (n2, label(Closeness Centrality)) (n3, label(Betweenness Centraltiy)) (n4, label(Eigenvector Centrality)), drop(_cons gender age edu) coeflabels(de_res="Degree" closnesscentrality="Closeness Centrality" bt_res="Betweenness Centrality" eigencentrality="Eigenvector Centrality" gender="Female" age="Age" edu="Education Level" ) xline(0) xtitle(Predicted Probability of Promotion to the 20th Politburo) scheme(s1mono) offset(0)


*party_rank
qui logit pro_rank degree edu age,robust
eststo k1
qui logit pro_rank closnesscentrality edu age,robust
eststo k2
qui logit pro_rank betweenesscentrality edu age,robust
eststo k3
qui logit pro_rank eigencentrality edu age,robust
eststo k4
esttab k1 k2 k3 k4, se pr2 scalars("ll Log lik." "chi2 Chi-squared")

*Figure7
gen de_res=degree/100
gen bt_res=betweenesscentrality/1000
quiet logit pro_rank de_res edu age,robust
margins, dydx(*) post
eststo n1
quiet logit pro_rank closnesscentrality edu age,robust
margins, dydx(*) post
eststo n2
quiet logit pro_rank bt_res edu age,robust
margins, dydx(*) post
eststo n3
quiet logit pro_rank eigencentrality edu age,robust
margins, dydx(*) post
eststo n4
coefplot (n1, label(Degree)) (n2, label(Closeness Centrality)) (n3, label(Betweenness Centraltiy)) (n4, label(Eigenvector Centrality)), drop(_cons gender age edu) coeflabels(de_res="Degree" closnesscentrality="Closeness Centrality" bt_res="Betweenness Centrality" eigencentrality="Eigenvector Centrality" gender="Female" age="Age" edu="Education Level" ) xline(0) xtitle(Predicted Probability of Ranking Promotion in the 20th Party Congress) scheme(s1mono) offset(0)

